.\" SPDX-License-Identifier: CC-BY-SA-4.0 or-later
.\" SPDX-FileCopyrightText: 2022 grommunio GmbH
.TH gromox\-eml2mt 8 "" "Gromox" "Gromox admin reference"
.SH Name
gromox\-eml2mt \(em Utility for analysis/importing various formats
.SH Synopsis
\fBgromox\-eml2mt\fP [\fB\-Ppt\fP] \fIfile.eml\fP[...]
.PP
\fBgromox\-ical2mt\fP [\fB\-Ppt\fP] \fIfile.ics\fP[...]
.PP
\fBgromox\-mbox2mt\fP [\fB\-Ppt\fP] \fIfile.mbox\fP[...]
.PP
\fBgromox\-tnef2mt\fP [\fB\-Ppt\fP] \fIfile.tnef\fP[...]
.PP
\fBgromox\-vcf2mt\fP [\fB\-Ppt\fP] \fIfile.vcf\fP[...]
.SH Description
gromox\-eml2mt reads one or more RFC5322-formatted e-mail messages and
re-exports the data in a Gromox-specific mailbox transfer format to stdout for
consumption by pipe by the gromox-mt2exm(8gx) program. Each file must contain
at most one RFC5322 message.
.PP
When called as gromox\-mbox2mt, the input is treated as RFC4155-formatted Unix
mailbox.
.PP
When called as gromox\-ical2mt, the input is treated as RFC5545-formatted
calendaring and scheduling objects (.ics).
.PP
When called as gromox\-vcf2mt, the input is treated as RFC4770/6530-formatted
vCard objects (.vcf).
.PP
When called as gromox\-tnef2mt, the input is treated as a MS-OXTNEF object.
.PP
eml2mt will resolve email addresses to Gromox objects already, so the emitted
data stream should be consumed by an mt2exm invocation on the \fIsame\fP Gromox
cluster.
.PP
All objects in the output stream are unanchored so that the \-B option of
gromox\-mt2exm can be used to select placement. (Prior to Gromox 2.46,
some modes like \-\-ical and \-\-vcard emitted an anchor.)
.SH Options
.TP
\fB\-\-decap\fP=\fIn\fP
Once a MAPI message object is constructed, select attachment number \fIn\fP's
embedded message as the "top-level" message and discard the rest of the outer
message. \fIn\fP is 1-based.
.TP
\fB\-\-ical\fP
Treat all file arguments as iCalendar input. This is the default if the program
was invoked as gromox\-ical2mt.
.TP
\fB\-\-loglevel\fP \fIn\fP Maximum verbosity of general logging (not connected
to \fB\-p\fP, \fB\-t\fP or \fB\-v\fP). 1=crit, 2=error, 3=warn, 4=notice,
5=info, 6=debug.
.br
Default: \fI4\fP (notice)
.TP
\fB\-\-mail\fP
Treat all file arguments as Internet Mail input. This is the default if the
program was invoked as gromox\-eml2mt.
.TP
\fB\-\-mbox\fP
Treat all file arguments as Unix mboxes. This is the default if the program was
invoked as gromox\-mbox2mt.
.TP
\fB\-\-oneoff\fP
Do not resolve email addresses to EX addresses, but to ONEOFF instead. This
way, streams created by eml2mt can be imported into \fIother\fP Gromox
clusters that do not have the same user set.
.TP
\fB\-\-tnef\fP
Treat all file arguments as Transport Neutral Encapsulation Format objects.
This is the default if the program was invoked as gromox\-tnef2mt.
.TP
\fB\-\-vcard\fP
Treat all file arguments as vCard input. This is the default if the program was
invoked as gromox\-vcf2mt.
.TP
\fB\-P\fP
Enable super-pedantic mode when parsing VCARDs and reject everything that is
not recognized. (Not recommended)
.TP
\fB\-p\fP
Show properties in detail (enhances \fB\-t\fP). Using \-p twice prints
properties with human-readable mnemonic names. The BIN2TXT_MODE environment
variable can be set to control how binary properties are presented; possible
values are "co" (C string representation with octal escapes), "cstr" (C string
representation, any form) and "hex" (two-hex-nibble representation), "txt"
(compact representation for light-binary text-heavy content).
.TP
\fB\-t\fP
Show a diagnostic tree view of the source data as it is being read.
.SH Examples
Import of an RFC5322 message (sometimes with .eml file extension) to drafts:
.PP
gromox\-eml2mt msg.eml | gromox\-mt2exm \-u recipient@domain.example \-B drafts
.PP
Import of calendar objects:
.PP
gromox\-ical2mt meeting.ics | gromox\-mt2exm \-u recipient@domain.example
.SH See also
\fBgromox\fP(7), \fBgromox\-exm2eml\fP(8), \fBgromox\-mt2exm\fP(8)
